package com.iflytek.universitymanagement.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.iflytek.universitymanagement.domain.ScoreAnalysisResult;
import com.iflytek.universitymanagement.domain.StudentScore;

import java.math.BigDecimal;
import java.util.List;

public interface StudentScoreService extends IService<StudentScore> {

    // 获取单个学生的成绩分析
    ScoreAnalysisResult getScoreAnalysisByStudentId(Integer studentId);

    // 获取所有学生成绩分析（分页）
    Page<ScoreAnalysisResult> getAllStudentScoreAnalysis(Page<StudentScore> page);

    List<StudentScore> getStudentProgressAndScoresByName(String name);


    // 获取单个学生的平均成绩
    BigDecimal getAverageScoreByStudentId(Integer studentId);

    IPage<StudentScore> selectPage(int pageNum, int pageSize, String name, String courseName);

    boolean addStudentScore(StudentScore studentScore);

    IPage<StudentScore> getScoresWithPagination(int pageNum, int pageSize);

}
